<?php



$base='/tmp/base3.db';
$sql="select * from T1";

unlink ($base);

$db = sqlite_open($base, 0777, $sqliteerreur);
if (!$db) {
    die($sqliteerreur);
}
 
sqlite_query($db, 'CREATE TABLE T2 (id varchar(10))');

sqlite_query($db, "INSERT INTO T2 VALUES ('fnord')");
sqlite_query($db, "INSERT INTO T2 VALUES ('fnord2')");
sqlite_query($db, "INSERT INTO T2 VALUES ('fnord3')");

echo "\nRecuperation 1 ligne: ";
$result = sqlite_query($db, 'select id from T2');
var_dump(sqlite_fetch_array($result)); 

echo"\nRecuperation toutes les lignes: ";
$result2 = sqlite_query($db, 'select id from T2');
var_dump(sqlite_fetch_all($result2, SQLITE_ASSOC )); 


?>
